<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%
	String path = request.getContextPath();
%>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title>list</title>
		<script type="text/javascript" language="javascript" src="<%=path%>/js/jquery-1.3.1.min.js"></script>
		<script type="text/javascript" language="javascript" src="<%=path%>/js/udCheck.js"></script>
		<script type="text/javascript" language="javascript" src="<%=path%>/js/jquery.jmodal.js"></script>
		<link href="<%=path%>/css/main.css" type="text/css" rel="stylesheet"/>
		<link href="<%=path%>/css/jquery.jmodal.css" type="text/css" rel="stylesheet"/>
	</head>
	<body>
		<f:view>
			<h:form id="peopleForm">
				<h:inputHidden id="roleCheckbox" value="#{peopleBean.roleCheckbox}"></h:inputHidden>
				<h:inputHidden id="searchTag" value="#{peopleBean.searchTag}" />
				<div class="cont2">
					<div class="table2">
						<div class="title1Bg">
							<div class="title1 f14">
								<strong>用户查询</strong><span class="f12 fright"> <h:commandLink
										action="#{peopleBean.search}" styleClass="buts but2"
										value="查询">
										<f:param name="searchFlag" value="isListSearch"></f:param>
									</h:commandLink> <a href="##" onclick="javascript:searchReset()"
									class="buts but3">重置</a> </span>
							</div>
						</div>
						<div class="cont3Bg">
							<div class="cont3Bg2">
								<table border="0" cellpadding="0" cellspacing="0" class="cont3">
									<tr>
										<td align="left" width=200 class="f14">
											用户名称:
										</td>
										<td width=100>
											<h:inputText id="userName" size="30"
												value="#{peopleBean.queryName}" />
										</td>
										
									</tr>
									<tr>
										<td colspan="4" class="td1" height="1"></td>
									</tr>
								</table>
							</div>
						</div>
					</div>
					<div class="table1">
						<div class="title1Bg">
							<div class="title1 f14">
								<strong>用户列表</strong><span class="f12 fright"> <h:inputHidden
										id="recordCount" value="#{peopleBean.recordCount}" /> <h:inputHidden
										id="pageCount" value="#{peopleBean.pageCount}" /> <h:inputHidden
										id="previousPage" value="#{peopleBean.previousPage}" /> <h:inputHidden
										id="nextPage" value="#{peopleBean.nextPage}" /> 共 <h:outputText
										value="#{peopleBean.recordCount}" /> 条记录 | 每页显示 <h:inputText
										id="pageRecord" value="#{peopleBean.pageRecord}" size="1" />
									条 </span>
							</div>
						</div>
						<table cellpadding="0" cellspacing="0" width="100%">

							<h:dataTable binding="#{peopleBean.TData}"
								value="#{peopleBean.items}" var="item"
								headerClass="dataTableHead" columnClasses="dataTableTD"
								styleClass="table4">
								<h:column>
									<f:facet name="header">
										<h:outputText value="" />
									</f:facet>
									<h:selectBooleanCheckbox id="checked"
										binding="#{peopleBean.selected}" />
								</h:column>
								<h:column>
											<f:facet name="header">
												<h:outputText value="用户姓名" />
											</f:facet>
											<h:outputText value="#{item.userName}" />
								</h:column>
								<h:column>
											<f:facet name="header">
												<h:outputText value="用户所属角色" />
											</f:facet>
											<h:outputText value="#{item.roleName}" />
								</h:column>
								<h:column>
											<f:facet name="header">
												<h:outputText value="电话" />
											</f:facet>
											<h:outputText value="#{item.mobile}" />
								</h:column>
								<h:column>
											<f:facet name="header">
												<h:outputText value="邮箱" />
											</f:facet>
											<h:outputText value="#{item.email}" />
								</h:column>
								<h:column>
											<f:facet name="header">
												<h:outputText value="备注" />
											</f:facet>
											<h:outputText value="#{item.remark}" />
								</h:column>

							</h:dataTable>
						</table>
						<div class="bottomBg">
							<div class="bottom">
								<div class="page green">
									<h:commandLink action="#{peopleBean.search}" value="首页">
										<f:param name="newCurrentPage" value="1"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									<h:commandLink action="#{peopleBean.search}" value="上一页">
										<f:param name="newCurrentPage"
											value="#{peopleBean.previousPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:outputText value="#{peopleBean.currentPage}" />
									&nbsp;
									<h:commandLink action="#{peopleBean.search}" value="下一页>>">
										<f:param name="newCurrentPage" value="#{peopleBean.nextPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:commandLink action="#{peopleBean.search}" value="末页>>">
										<f:param name="newCurrentPage" value="#{peopleBean.pageCount}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
								</div>

								<h:commandLink value="添加" styleClass="buts but4"
									action="#{peopleBean.preAdd}" />
								<h:commandLink value="修改" styleClass="buts but5"
									action="#{peopleBean.preUpdate}"
									onmousedown="return check_updMultiBox(this);"
									/>
								<h:commandLink value="删除" styleClass="buts but6"
									action="#{peopleBean.delete}"
									onmousedown="return deletes(this);"/>
							</div>
						</div>
					</div>
				</div>
			</h:form>
		</f:view>
		<script>
		function searchReset(){
			document.getElementById("peopleForm:userName").value="";
			
        }
		</script>
	</body>
</html>
